<?php
  session_start();
  include_once("./libraries/util.inc.php");
  if (isset($_SESSION["loginUsername"])) {
    //we're already logged in, so go to the main screen
    header("Location: index.php");
    exit;
  }  
?>
<?php
  printHeader();
  printBody();
  echo "<h2>", appName, " Login Page</h2>";
?>

  <form method="POST" action="./loginCheck.php">
  <table>
    <tr><td>Enter your username:</td>
        <td><input type="text" size=10 maxlength=10 name="loginUsername"></td></tr>
<!--
    <tr><td>Enter your password:</td>
        <td><input type="password" size=10 maxlength=10 name="loginPassword"></td></tr>
-->
  </table>
  <p><input type="submit" value="Log in">
  </form>
  
<?php
  if(isset($_SESSION["message"])) {
    echo "<br /><font color = \"red\">{$_SESSION["message"]}</font>";
    unset($_SESSION["message"]);
  } 
?>
  <!-- or we can sign up into the system -->
  <br />
  <br />
  <a href = "signup.php"> I want to sign up to use the system!</a>

  <br />
  <br />
  <a href = "usage-guide.txt"> A guide to use the CondorDB experimental cluster</a>

  <br />
  <br />
  <a href = "overview_07-18-2007.pdf"> An overview of Quill (pdf)</a>

  <br />
  <br />
  <a href = "./demo/index.php"> Condor Week 2007 Demo Information</a>

  <?php
    printFooter();    
?>
